package com.my.admin.config.shiro.util;

import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;

public class TokenUtil {

    private static final String AUTHENTICATION_TOKEN = "Authentication-Token";

    public static String getRequestToken(HttpServletRequest request) {
        return request.getHeader(AUTHENTICATION_TOKEN.toLowerCase());
    }

    public static String getRequestToken(ServletRequest request) {
        return getRequestToken((HttpServletRequest) request);
    }

}
